]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
a11y: fixing a regression with the accessible name at dash items
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 24 Oct 2012 17:29:07 +0000 (19:29 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 6 Nov 2012 09:05:18 +0000 (10:05 +0100)
After some changes, the tooltip label at the dash is not available
until it is visually shown. As this is not anymore a reliable
source of accessible name, we just set the accessible name
with the string used on that label.

https://bugzilla.gnome.org/show_bug.cgi?id=686583

js/ui/dash.js

index b564aea8c202421557d3b771803280644ded1436..e1ad32145ca37c676fbeec84778d5658bf908df2 100644 (file)
@@ -142,6 +142,7 @@ const DashItemContainer = new Lang.Class({
 
     setLabelText: function(text) {
         this._labelText = text;
+        this.child.accessible_name = text;
     },
 
     hideLabel: function () {
@@ -259,7 +260,6 @@ const ShowAppsIcon = new Lang.Class({
 
         this.setChild(this.toggleButton);
         this.setDragApp(null);
-        this.toggleButton.label_actor = this.label;
     },
 
     _createIcon: function(size) {
@@ -507,9 +507,11 @@ const Dash = new Lang.Class({
         let item = new DashItemContainer();
         item.setChild(display.actor);
 
+        // Override default AppWellIcon label_actor, now the
+        // accessible_name is set at DashItemContainer.setLabelText
+        display.actor.label_actor = null;
         item.setLabelText(app.get_name());
-        // Override default AppWellIcon label_actor
-        display.actor.label_actor = item.label;
+
         display.icon.setIconSize(this.iconSize);
         this._hookUpLabel(item);